
int n = sc.nextInt();
Object[] object = new Object[n];
for (int i = 0; i < n; i++) {
	String choose = sc.next();
	if (choose.equals("c")) {
		object[i] = new Computer();
	}
	else if (choose.equals("d")) {
		Double d = new Double(sc.nextDouble());
		object[i] = d;
	} 
	else if (choose.equals("i")) {
		Integer num = new Integer(sc.nextInt());
		object[i] = num;
	}
	else if (choose.equals("s")) {
		String str = new String(sc.next());
		object[i] = str;
	} 
	else {
		object[i] = null;
	}
}
for (int i = n - 1; i >= 0; i--) {
	if (object[i]  != null)	System.out.println(object[i]);
}